package ${mapstructPackage};

import ${entityPackage}.${domainObjectName};
import ${modelPackage}.${domainObjectName}DTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * ${domainObjectName} 实体与DTO映射器
 * @author ${author!}
 * @date ${date?string("yyyy-MM-dd")}
 */
@Mapper
public interface ${domainObjectName}Mapper {

    ${domainObjectName}Mapper INSTANCE = Mappers.getMapper(${domainObjectName}Mapper.class);

    /**
     * 实体转DTO
     */
    ${domainObjectName}DTO toDTO(${domainObjectName} ${domainObjectName?uncap_first});

    /**
     * DTO转实体
     */
    ${domainObjectName} toEntity(${domainObjectName}DTO ${domainObjectName?uncap_first}DTO);
}
